#include "mypushbutton.h"
#include <QStyle>

MyPushButton::MyPushButton(QWidget *parent) : QPushButton(parent)
{

}

void MyPushButton::mousePressEvent(QMouseEvent *e)
{
    this->setStyleSheet("QPushButton {color: red;}");
}

void MyPushButton::mouseReleaseEvent(QMouseEvent *e)
{
    this->setStyleSheet("QPushButton { color: blue; }");
}

void MyPushButton::enterEvent(QEvent *e)
{
    this->setStyleSheet("QPushButton {color: green;}");
}

void MyPushButton::leaveEvent(QEvent *e)
{
    this->setStyleSheet("QPushButton {color: yellow ;}");
}
